﻿using System;
using System.Windows.Forms;

namespace SilcQuest
{
    /// <summary>
    ///  Helper class dialog used to fetch max number of codes to export from a codelist
    /// </summary>
    public partial class DlgMaxCodes : Form
    {
        #region Properties

        public int MaxCodes
        {
            get
            {
                if (numTextBoxMaxCodes.Text.Trim() == string.Empty)
                    numTextBoxMaxCodes.Text = "1";

                return Math.Abs(Convert.ToInt16(numTextBoxMaxCodes.Text));
            }
            set
            {
                numTextBoxMaxCodes.Text = value.ToString();
            }
        }
        #endregion

        #region C'tor

        public DlgMaxCodes()
        {
            InitializeComponent();
        }
        #endregion
    }
}
